package com.ns.scs.sms.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ns.scs.sms.dto.SmsPageDto;
import com.ns.scs.sms.entry.SmsUser;
import com.ns.scs.sms.mapper.SmsUserMapper;
import com.ns.scs.sms.vo.SmsUserVO;
import com.ns.scs.sms.vo.SmsVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 参数业务实现
 *
 * @author lw
 * @since 2024/09/23
 */
@Service
@RequiredArgsConstructor
@Slf4j
public class SmsUserServiceImpl extends ServiceImpl<SmsUserMapper, SmsUser> implements ISmsUserService {
    private final SmsUserMapper mapper;

    @Override
    public Page<SmsUserVO> getList(SmsPageDto dto) {
        return mapper.getList(dto, new Page<>(dto.getCurrent(), dto.getSize()));
    }

    @Override
    public void updateStatus(Long id, int status) {
        mapper.updateStatus(id, status);
    }

    @Override
    public SmsVO getSmsParam(Long id) {
        return mapper.getSmsParam(id);
    }
}
